package com.gary.service.impl;

import com.gary.service.ITicketService;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 *  使用Java原生远程调用接口实现远程调用
 *      1、自定义接扣继承Remote接口
 *      2、实现类继承UnicastRemoteObject接口并实现他的构造方法【抛出异常】
 * @author pengrui
 * @date 2020/12/11 - 16:59
 */
public class TicketServiceImpl extends UnicastRemoteObject implements ITicketService {
    public TicketServiceImpl() throws RemoteException {
    }

    @Override
    public String proTicket(String name) throws RemoteException {
        return name+"购票《姜子牙》";
    }
}
